# 常用软件 rust cargo

rm -rf $HOME/.cargo $HOME/.rustup

export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"

# curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y # --default-toolchain nightly

curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y --default-toolchain nightly
source $HOME/.cargo/env
ln -sf $HOME/mydotfiles/config/langconfig/cargo/config $HOME/.cargo/config

# paru -S --needed clang-git lld-git # --noconfirm
# cargo install  wasm-pack cargo-watch # fleet-rs sccache

rustup component add rust-analyzer-preview #rust-analyzer
rustup component add rust-src
rustup target add wasm32-wasi
cargo install wasm-pack cargo-watch fleet-rs sccache
# curl -fsSLk https://gitee.com/wtklbm/rust-library-chinese/raw/main/bin/install.sh | sh -s -- -y  # 中文库 1.6.1
